<?php
$this->breadcrumbs=array(
	'Banner Details'=>array('index'),
	'Manage',
);

$this->menu=array(
	array('label'=>'List BannerDetails', 'url'=>array('index')),
	array('label'=>'Create BannerDetails', 'url'=>array('create')),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$.fn.yiiGridView.update('banner-details-grid', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<div class="admin_table">
<h1> Banners List </h1>
<div class="nav_wrap">
<?php echo CHtml::link('Advanced Search','#',array('class'=>'search-button')); ?>
</div>
<div class="search-form" style="display:none">
<?php $this->renderPartial('_search',array(
	'model'=>$model,
)); ?>
</div><!-- search-form -->

<?php 
Yii::import('application.components.EImageColumn');
$this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'banner-details-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		'id',
		'title',
		 array(
            'class'=>'EImageColumn',
            'name' => 'image',
            'htmlOptions' => array('style' => 'width: 110px;height:60px;'),
            ),
		array(
			'name'=>'page',
			'value'=>'Pages::model()->getModel("PAGE-NAME-BY-ID",array("pageid"=>$data->page))'
			),
		array(
			'name'=>'location_tags',
			'filter'=>false,
			'value'=>'LocationTags::model()->getList("COMMA-SEPARATED-IDS",array("locationids"=>$data->location_tags))'
			),
		/*
		'created',
		'modified',
		*/
		array(
			'class'=>'CButtonColumn',
			'template'=>'{update}{delete}',
		),
	),
)); ?>
</div>